<template>
  <h1>已支付的订单</h1>
  <el-table :data="payOkList" style="width: 100%">
    <el-table-column label="订单id" prop="orderNo" />
    <el-table-column label="收货人手机号" prop="linkPhone" />
    <el-table-column prop="state" label="是否发货" width="150">
      <template v-slot="scope">
        {{ isFahuo[scope.row.state] }}
      </template>
    </el-table-column>
    <el-table-column label="收获地址" prop="linkAddress" />
    <el-table-column label="创建时间" prop="createTime" />
  </el-table>
  <!-- 删除弹框 -->
  <!-- <el-dialog
    v-model="centerDialogVisible"
    title="Warning"
    width="30%"
    align-center
  >
    <span>你确定要删除{{ orderInfo }}的内容么？</span>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="centerDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="centerDialogVisible = false">
          确定
        </el-button>
      </span>
    </template>
  </el-dialog> -->
</template>
<script setup lang="ts">
import axios from "axios";
import { getPayOkApi } from "../api/order";
import { onMounted, ref } from "vue";

const payOkList = ref();

const isFahuo = ["未支付", "已支付", "待发货", "待评论"];

const getPayOkList = async () => {
  const res = await getPayOkApi();
  payOkList.value = res.data.data;
  console.log(res);
};

onMounted(() => {
  getPayOkList();
});
</script>
<style></style>
